vue中獲取元素並控制相應的dom 1 在標簽中使用ref=“xxx” 2 在methods中調用this.$refs.xxx this.$refs.xxx.$el獲取dom 注意1:大多數情況下為了復用方法,將xxx傳給對應 ...